package com.gagakuai.demo.aop.early;


import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/*
 * @program: settement
 * @description:
 * @author: houhong
 * @create: 2022-11-13 16:11
 */
public class LogInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("方法前调用");
        Object proceed = methodInvocation.proceed();
        System.out.println(proceed.getClass() + "方法后调用");
        return proceed;
    }
}